do{
    var ua = window.navigator.userAgent.toLowerCase();

    if (ua.match(/MicroMessenger/i) != 'micromessenger') {
        break;
    }

    if(!sessionStorage.hasOwnProperty("is_login")){
        location.href = '/wap/jssdk/wechat_login.php?ref=' + encodeURIComponent(window.location.href);
    }

}while(0);

